<!DOCTYPE html>
<html>
<head>
	<title><?php echo isset($title)?$title:"";?></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="author" content="designer:webzhu, date:2012-03-23" />
<link rel="stylesheet" href="<?php echo urldecode(Url::urlFormat("@static/css/base.css"));?>" />
<link rel="stylesheet" href="<?php echo urldecode(Url::urlFormat("@static/css/admin.css"));?>" />
<link rel="stylesheet" href="<?php echo urldecode(Url::urlFormat("@static/css/font_icon.css"));?>" />
<?php echo JS::import('jquery');?>
<script type="text/javascript" src="<?php echo urldecode(Url::urlFormat("@static/js/common.js"));?>"></script>
<!--[if lte IE 7]><script src="<?php echo urldecode(Url::urlFormat("@static/css/fonts/lte-ie7.js"));?>"></script><![endif]-->
</head>
<body style="background: none;">
    <style media="print" type="text/css">
.noprint{display:none}
body{font-size: 8pt;}
</style>
<link rel="stylesheet" type="text/css" media="screen,print" href="<?php echo urldecode(Url::urlFormat("@static/css/print.css"));?>" />
<div class="panel">
	<?php $query = new Query("order as od");$query->fields = "od.*,cu.phone as uphone,us.name as uname";$query->join = "left join customer as cu on od.user_id = cu.user_id left join user as us on od.user_id = us.id";$query->where = "od.id = $id";$items = $query->find();?>
	<?php $order = $items[0];?>
	<table style="border-top:none;">
		<tr>
			<td ><img src="<?php echo urldecode(Url::urlFormat("@static/images/logo.png"));?>"  /></td>
			<td valign="bottom" align="rgiht" width="240"><p>客户：<?php echo isset($order['uname'])?$order['uname']:"";?> &nbsp;&nbsp;<span class="ml_20">电话：<?php echo isset($order['uphone'])?$order['uphone']:"";?></span></p></td>
		</tr>
		</table>
		<table >
		<tr><td><b>订单号：<?php echo isset($order['order_no'])?$order['order_no']:"";?></b></td><td align="right" width="240px"><b>订购日期：<?php echo isset($order['create_time'])?$order['create_time']:"";?></b></td></tr>
	</table>
	<table style="border:none;">
			<tr><th width="40">序号</th><th width="100">商品货号</th><th width="200">商品名称</th><th width="200">规格</th><th  width="80">单价</th><th  width="60">数量</th><th width="80">小计</th></tr>
				<?php $item=null; $query = new Query("order_goods as od");$query->fields = "go.name,pr.pro_no,pr.spec,od.goods_price,od.goods_nums";$query->join = "left join products as pr on od.product_id = pr.id  left join goods as go on od.goods_id = go.id";$query->where = "order_id = $id";$items = $query->find(); foreach($items as $key => $item){?>
				<?php $spec = unserialize($item['spec']);?>
				<tr><td><?php echo ($key+1);?></td><td><?php echo isset($item['pro_no'])?$item['pro_no']:"";?></td><td><?php echo isset($item['name'])?$item['name']:"";?></td><td>
					<?php if(is_array($spec)){?>
					<?php foreach($spec as $key => $ite){?>
						<?php echo isset($ite['name'])?$ite['name']:"";?>:<?php echo isset($ite['value'][2])?$ite['value'][2]:"";?>
					<?php }?>
					<?php }?>
				</td><td><?php echo isset($item['goods_price'])?$item['goods_price']:"";?></td><td><?php echo isset($item['goods_nums'])?$item['goods_nums']:"";?></td><td class="golden"><?php echo sprintf("%.2f",($item['goods_price']*$item['goods_nums']));?></td></tr>
				<?php }?>
	</table>
	<table >
		<tr>
			<td>订单附言：<?php echo isset($order['user_remark'])?$order['user_remark']:"";?></td>
			<td width="300">
			<ul>
			<li><span class="caption">商品价格：</span><?php echo isset($currency_symbol)?$currency_symbol:"";?><?php echo isset($order['payable_amount'])?$order['payable_amount']:"";?> <?php echo isset($currency_unit)?$currency_unit:"";?></li>
			<li><span class="caption">配送费用：</span><?php echo isset($order['real_freight'])?$order['real_freight']:"";?> <?php echo isset($currency_unit)?$currency_unit:"";?></li>
			<li><span class="caption">支付手续费：</span><?php echo isset($order['handling_fee'])?$order['handling_fee']:"";?> <?php echo isset($currency_unit)?$currency_unit:"";?></li>
			<li><span class="caption">订单优惠：</span>-<?php echo isset($order['discount_amount'])?$order['discount_amount']:"";?> <?php echo isset($currency_unit)?$currency_unit:"";?> </li>
			<?php if($order['voucher_id']){?>
			<?php $voucher= unserialize($order['voucher']);?>
			<li><span class="caption">代金券：</span>-<?php echo isset($voucher['value'])?$voucher['value']:"";?> <?php echo isset($currency_unit)?$currency_unit:"";?> </li>
			<?php }?>
			<li><b><span class="caption">应付总金额：</span><?php echo isset($currency_symbol)?$currency_symbol:"";?><?php echo isset($order['order_amount'])?$order['order_amount']:"";?> <?php echo isset($currency_unit)?$currency_unit:"";?></b></li>
			</ul></td>
		</tr>
	</table>
	<table>
		<tr>
			<td align="left"><img src="<?php echo urldecode(Url::urlFormat("/ajax/test?code=$order[order_no]"));?>"/></td>
			<td align="right">Powered By tinyrise.com</td>
		</tr>
	</table>
		<div><input class="button noprint" type="submit" onclick="window.print();" value="打印" /></div>
</div>
</body>
</html>
<!--Powered by TinyRise-->